package com.imay.live.model;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Parcel;
import android.os.Parcelable;

import com.alibaba.fastjson.annotation.JSONField;
import com.imay.live.R;

/**
 * Created by liangzhenxiong on 2017/04/14 0014.
 */

public class UserModel implements Parcelable {
    /**
     * uid : 24285
     * roomId : 136063
     * nick : 牙牙乐~
     * imgHead : https://imgs.imay.com/pic-24285-1482398013-4255.png
     * sex : 2
     * userLevel : 19
     * liveLevel : 28
     * vip : 1
     * city :
     * myFollow : false
     * isLive : 0
     * UserLv : 19
     * LiveLv : 28
     * LargeVipStatus : 3
     * LiveStatus : 0
     */

    //http接口
//    private long uid;
//    private long roomId;
//    private String nick;
//    private String imgHead;
//    private int sex;
    @JSONField(name = "UserLv")
    private int userLevel;
    @JSONField(name = "LiveLv")
    private int liveLevel;
    private int vip;
    private String city;
    //    private boolean myFollow;
    private int isLive;
//    private int UserLv;
//    private int LiveLv;
//    private int LargeVipStatus;
//    private int LiveStatus;

    private int familyId;
    private int lv;

    //socket接口
    /**
     * 基本数据
     */
    public long uid;

    public long roomId;

    public String nick;

    public String imgHead;

    /**
     * 1:男,2:女
     */
    public int sex;

    public String intro;

    public String website;

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getWebsite() {
        return website;
    }

    public void setWebsite(String website) {
        this.website = website;
    }
    //    /**
//     * 	附加属性 同infosimple
//     * 用户等级
//     */
//    public int UserLv;
//
//    /**
//     * 直播等级
//     */
//    public int LiveLv;

    /**
     * 实名认证
     */
    public int RealNameStatus;

    /**
     * 实名认证失败原因(认证失败时字段有效)，0:人工审核, 11:支付宝未实名,12:支付宝帐号已经被认证过了,13:其他原因
     */
    public int RealNameFailedReason;

    /**
     * 真实姓名(只有认证失败时有效)
     */
    public String RealName;

    /**
     * 身份证号(只有认证失败时有效)
     */
    public String IdentificationNum;

    /**
     * 大V认证
     * //大v身份 0:未激活,1:激活认证审核,2审核失败,3审核成功
     */
    public int LargeVipStatus;

    /**
     * 开播状态 0:未开播;1:正常直播;2:主播暂停
     */
    public int LiveStatus;

    /**
     * 官方V账号 0:普通账号 1:官方V号
     */
    public int OfficialVip;

    /**
     * 经验
     * 直播经验
     */
    public long LiveExp;

    /**
     * 用户经验
     */
    public long UserExp;

    /**
     * 货币
     * 魅钻-当前
     */
    public long diamond;

    /**
     * 魅钻-累计消费
     */
    public long diamondExpend;

    /**
     * 魅力-当前
     */
    public long meili;

    /**
     * 魅力-累计获得
     */
    public long meiliGain;

    /**
     * 魅钻-来自充值
     */
    public long DiamondRecharge;

    /**
     * 社交统计
     * 关注人数
     */
    public long follow;

    /**
     * 粉丝人数
     */
    public long follower;

    /**
     * 获得赞数量
     */
    public long praise;

    /**
     * 获取别人信息时才有
     * 是否已关注
     */
    public boolean myFollow;

    /**
     * 被封状态 1:封流 2:封房 3:封号
     */
    public int BlockStatus;

    private String designation;

    public UserModel() {
        super();
    }

    protected UserModel(Parcel in) {
        uid = in.readLong();
        roomId = in.readLong();
        nick = in.readString();
        imgHead = in.readString();
        sex = in.readInt();
        userLevel = in.readInt();
        liveLevel = in.readInt();
        vip = in.readInt();
        city = in.readString();
        myFollow = in.readByte() != 0;
        isLive = in.readInt();
        LargeVipStatus = in.readInt();
        LiveStatus = in.readInt();
        designation = in.readString();
        familyId = in.readInt();
        lv = in.readInt();
    }

    public static final Creator<UserModel> CREATOR = new Creator<UserModel>() {
        @Override
        public UserModel createFromParcel(Parcel in) {
            return new UserModel(in);
        }

        @Override
        public UserModel[] newArray(int size) {
            return new UserModel[size];
        }
    };

    public long getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public long getRoomId() {
        return roomId;
    }

    public void setRoomId(long roomId) {
        this.roomId = roomId;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public String getImgHead() {
        return imgHead;
    }

    public void setImgHead(String imgHead) {
        this.imgHead = imgHead;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public int getUserLevel() {
        return userLevel;
    }

    public void setUserLevel(int userLevel) {
        this.userLevel = userLevel;
    }

    public int getLiveLevel() {
        return liveLevel;
    }

    public void setLiveLevel(int liveLevel) {
        this.liveLevel = liveLevel;
    }

    public int getVip() {
        return vip;
    }

    public void setVip(int vip) {
        this.vip = vip;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public boolean isMyFollow() {
        return myFollow;
    }

    public void setMyFollow(boolean myFollow) {
        this.myFollow = myFollow;
    }

    public int getIsLive() {
        return isLive;
    }

    public void setIsLive(int isLive) {
        this.isLive = isLive;
    }

    public int getLargeVipStatus() {
        return LargeVipStatus;
    }

    public void setLargeVipStatus(int LargeVipStatus) {
        this.LargeVipStatus = LargeVipStatus;
    }

    public int getLiveStatus() {
        return LiveStatus;
    }

    public void setLiveStatus(int LiveStatus) {
        this.LiveStatus = LiveStatus;
    }

    public String getDesignation() {
        return designation;
    }

    public void setDesignation(String designation) {
        this.designation = designation;
    }

    public int getFamilyId() {
        return familyId;
    }

    public void setFamilyId(int familyId) {
        this.familyId = familyId;
    }

    public int getLv() {
        return lv;
    }

    public void setLv(int lv) {
        this.lv = lv;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(uid);
        dest.writeLong(roomId);
        dest.writeString(nick);
        dest.writeString(imgHead);
        dest.writeInt(sex);
        dest.writeInt(userLevel);
        dest.writeInt(liveLevel);
        dest.writeInt(vip);
        dest.writeString(city);
        dest.writeByte((byte) (myFollow ? 1 : 0));
        dest.writeInt(isLive);
        dest.writeInt(LargeVipStatus);
        dest.writeInt(LiveStatus);
        dest.writeString(designation);
        dest.writeInt(familyId);
        dest.writeInt(lv);
    }
}
